﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SummerTraining.OO;

namespace SummerTraining
{
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
            comboBox1.DataSource = Enum.GetValues(typeof(Gender));
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string text = comboBox1.Text;
            Gender g = (Gender)Enum.Parse(typeof(Gender), text);
            MessageBox.Show(g.ToString());
        }

        private void button2_Click(object sender, EventArgs e)
        {
            SearchForm form = new SearchForm();
            form.Show();
        }
    }
}
